home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / PNL Libraries / MyWakeUp.p < prev    next >
Text File  |  1995-03-19  |  687b  |  47 lines

  1. unit MyWakeUp;
  2.  
  3. interface
  4.  
  5.     procedure InitWakeUp;
  6.     procedure FinishWakeUp;
  7.     procedure WakeUp;
  8.  
  9. implementation
  10.  
  11.     uses
  12.         Processes,GestaltEqu;
  13.  
  14.     var
  15.         our_psn: ProcessSerialNumber;
  16.  
  17. {$PUSH}
  18. {$D-}
  19.  
  20.     procedure WakeUp;
  21.         var
  22.             junk: OSErr;
  23.     begin
  24.         if (our_psn.highLongOfPSN <> 0) or (our_psn.lowLongOfPSN <> 0) then begin
  25.             junk := WakeUpProcess(our_psn);
  26.         end;
  27.     end;
  28.  
  29. {$POP}
  30.  
  31.     procedure InitWakeUp;
  32.         var
  33.             gv: longInt;
  34.             junk: OSErr;
  35.     begin
  36.         our_psn.highLongOfPSN := 0;
  37.         our_psn.lowLongOfPSN := 0;
  38.         if (Gestalt(gestaltOSAttr, gv) = noErr) & (BTST(gv, gestaltLaunchControl)) then begin
  39.             junk := GetCurrentProcess(our_psn);
  40.         end;
  41.     end;
  42.  
  43.     procedure FinishWakeUp;
  44.     begin
  45.     end;
  46.  
  47. end.